<?php
/**
 * Created by PhpStorm.
 * User: zyw
 * Date: 2018-02-28
 * Time: 14:32
 */

class UserAdmin extends MY_Model{

    protected $table = 't_admin';

    public function __construct(){
        parent::__construct();
    }

    /**
     * 获取管理员列表
     * @return mixed
     */
    public function getAdminList(){
        $this->db->select($this->UserModel->table.".*,".$this->table.".is_persp,is_audit");
        $this->db->where($this->table.".type", 0);
        $this->db->from($this->table);
        $this->db->join($this->UserModel->table, $this->table.'.uid = '.$this->UserModel->table.'.uid');
        $userList = $this->db->get()->result_array();
        return $userList;
    }

}